pull: Remove explicit threading
authorColin Walters <walters@verbum.org>
Fri, 21 Feb 2014 17:56:41 +0000 (12:56 -0500)
committerColin Walters <walters@verbum.org>
Fri, 21 Feb 2014 20:04:23 +0000 (15:04 -0500)
commitb762c2f8f1f0245d4994864f0fa8d9ac1ba261b8
tree19dcb871577fc55c746eeddd3ace545c7225562f
parentf2e0162846cbb84abf6fd9a38fabdfd588f4eb2f
pull: Remove explicit threading

Mixing async and threads has proved to be too much for my little mind.
It has race conditions that I've tried repeatedly to fix, but failed.

The threading here was scanning metadata objects - and there are
two parts to that:

1) Physically loading them from disk
2) Parsing them

Now #1 has been partially addressed by avoiding a storm of lstat() if
we're starting from a known working state.  If pull gets interrupted,
then we do need to rescan all objects.  Also, we can address this with
local metadata packfiles.

The other potentially slow bit is that we recurse across the metadata,
blocking the main thread.  We could ameliorate that in the future by
scheduling metadata parsing as idle "chunks".

Anyways, let's move the needle back to reliability, and readd speed
more carefully.

https://bugzilla.gnome.org/show_bug.cgi?id=706456
src/libostree/ostree-repo-pull.c